import { Card } from 'antd-mobile'
import React, { Component } from 'react'
import { getUserInfo } from '@/servers/receivedInfo'
import classnames from 'classnames'
import styles from './index.less'
export default class ReceivedInfo extends Component {
    state = {
        name: '',
        tel: '',
        address: ''
    }
    componentDidMount() {
        // name tel address
        getUserInfo().then(data => this.setState({ ...data })
        )
    }
    /**
     * i 图标
     *  iconfont icon-dizhi_huaban 
     */
    render() {
        return (
            <Card className={styles.main}>
                <i className={classnames(styles.icon, 'xyCenter', 'iconfont icon-dizhi_huaban')}></i>
                <div>
                    <span className={'font14'}>{this.state.name}</span>
                    <span className={'font12'}>{this.state.tel}</span>
                </div>
                <div>
                    <span className="font12">{this.state.address}</span>
                </div>
            </Card>
        )
    }
}
